#include <Wire.h>
#include <AHTxx.h>
float ahtValue;                               //to store T/RH result
AHTxx aht20(AHTXX_ADDRESS_X38, AHT2x_SENSOR); //sensor address, sensor type

void setup()
{
  Serial.begin(115200);
  Serial.println();
  aht20.begin();  
}

void loop()
{
  ahtValue = aht20.readTemperature(); //read 6-bytes via I2C, takes 80 milliseconds

  Serial.print(F("Temperature...: "));
   Serial.println(ahtValue);
     Serial.print(F("Humidity...: "));
  ahtValue = aht20.readHumidity(); //read another 6-bytes via I2C, takes 80 milliseconds
Serial.println(ahtValue);
  delay(1000); //recomended polling frequency 8sec..30sec
}



